﻿using System;
using System.Collections.Generic;
using System.Text;

namespace TST.WebParts
{
    /// <summary>
    /// A Tag class
    /// Tag Cloud based on the tag cloud web part in the Community Kit for SharePoint
    /// http://www.codeplex.com/CKS
    /// </summary>
    [Serializable()]
    public class Tag : IComparable
    {
        public Tag()
        {
            Name = String.Empty;
            Value = String.Empty;
            Count = 0;
        }

        public Tag(string name, int count, string value)
        {
            Name = name;
            Count = count;
            Value = value;
        }

        public string Name { get; set; }
        public string Value { get; set; }
        public int Count { get; set; }

        #region IComparer Members

        public int CompareTo(object obj)
        {
            Tag tag = (Tag)obj;

            return this.Name.CompareTo(tag.Name);
        }

        #endregion
    }
}
